<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>ECharts</title>
    <!-- 引入 echarts.js -->
    <script src="http://10.5.21.118/libjs/echarts.min.js"></script>
    <script src="http://10.5.21.118/libjs/jquery-1.11.1.min.js"></script>
	<script src="http://10.5.21.118/libjs/echarts-wordcloud.min.js"></script>
	<style>
     *{
        margin: 0;
        padding: 0;
    }
    div{
        width:100%;
        height: 100%;
        position: absolute;
    }
	</style>

</head>
<body>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main"></div>
    <script type="text/javascript">
        var myChart = echarts.init(document.getElementById('main'));
		
		var option = {
                tooltip: {},
                series: [ {
                    type: 'wordCloud',
                    gridSize: 2,
                    sizeRange: [12, 50],
                    rotationRange: [-90, 90],
                    shape: 'pentagon',
                    width: 600,
                    height: 400,
                    textStyle: {
                        normal: {
                            color: function () {
                                return 'rgb(' + [
                                    Math.round(Math.random() * 160),
                                    Math.round(Math.random() * 160),
                                    Math.round(Math.random() * 160)
                                ].join(',') + ')';
                            }
                        },
                        emphasis: {
                            shadowBlur: 10,
                            shadowColor: '#333'
                        }
                    },
                    data: [
                        {
                            name: 'Sam S Club',
                            value: 10
                           /* textStyle: {
                                normal: {
                                    color: 'black'
                                },
                                emphasis: {
                                    color: 'red'
                                }
                            }*/
                        },
                        {
                            name: 'Macys',
                            value: 2
                        },
                        {
                            name: 'Amy Schumer',
                            value: 4
                        },
                        {
                            name: 'Jurassic World',
                            value: 5
                        },
                        {
                            name: 'Charter Communications',
                            value: 24
                        },
                        {
                            name: 'Chick Fil A',
                            value: 22
	                },
                        {
                            name: 'Planet Fitness',
                            value: 18
                        },
                        {
                            name: 'Pitch Perfect',
                            value: 14
                        },
                        {
                            name: 'Express',
                            value: 11
                        },
                        {
                            name: 'Home',
                            value: 9
                        },
                        {
                            name: 'Johnny Depp',
                            value: 8
                        },
                        {
                            name: 'Lena Dunham',
                            value: 5
                        },
                        {
                            name: 'Lewis Hamilton',
                            value: 5
                        },
                        {
                            name: 'KXAN',
                            value: 5
                        },
                        {
                            name: 'Mary Ellen Mark',
                            value: 4
                        },
                        {
                            name: 'Farrah Abraham',
                            value: 3
                        },
                        {
                            name: 'Rita Ora',
                            value: 3
                        },
                        {
                            name: 'Serena Williams',
                            value: 2
                        },
                        {
                            name: 'NCAA baseball tournament',
                            value: 2
                        },
                        {
                            name: 'Point Break',
                            value: 2
                        }
                    ]
                } ]
            };

                    
		window.onresize = myChart.resize;
		myChart.setOption(option);		
    </script>
</body>
</html>

